import { makeObservable, observable, action } from 'mobx';

class Apple {
  constructor (number) {
    this.number = number;
    this.weight = 150 + Math.floor(Math.random() * 100);
    this.ate = false;

    makeObservable(this, {
      ate: observable,
      eating: action.bound,
    });
  }

  eating () {
    this.ate = true;
  }
}

export default Apple;